package com.lagou.service.impl;

import com.lagou.service.WorldService;
import org.apache.dubbo.config.annotation.DubboService;
import org.apache.dubbo.config.annotation.Service;
import org.apache.dubbo.rpc.RpcContext;

@DubboService
public class WorldServiceImpl implements WorldService {

    @Override
    public String sayWorld(String name, int timeToWait) {

        String ip = RpcContext.getContext().getAttachment("ip");
        System.out.println("world:"+name+",ip:"+ip);
        return "world:"+name+",ip:"+ip;
    }
}
